home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-11-03 | 513 b | 20 lines | [TEXT/KEEN] |
- # $ExtractExternRefs - a simple version, with no comment skipping.
- #Prints all "extern" references on per-file basis, sticking
- #line number before each reference.
- #Typically use the "MFS selected files" input option
- #output goes to stdout
-
- FNR == 1 { n = split(FILENAME, names, ":")
- print names[n] ":" }
- nosemi == 1 { print " ", $0
- if (match($0, /;/) > 0)
- nosemi = 0
- next
- }
- $1 ~ /\bextern\b/ { print FNR, "\t", $0
- if (match($0, /;/) > 0)
- nosemi = 0
- else
- nosemi = 1
- }
-